﻿package frEngine.multiThread.proxy
{
    import com.gengine.resource.mutiThread.*;
    import flash.utils.*;
    import frEngine.multiThread.vo.*;
    import frEngine.shader.*;

    public class ThreadImpDoingHelp extends Object
    {
        private var _program3dBuilder:Program3DBuilder;
        private var _voObj:Object;
        public static const instance:ThreadImpDoingHelp = new ThreadImpDoingHelp;

        public function ThreadImpDoingHelp()
        {
            this._program3dBuilder = new Program3DBuilder();
            return;
        }// end function

        public function doingAgal(param1:Object) : void
        {
            this._voObj = param1;
            var _loc_2:* = param1.VparamList;
            var _loc_3:* = param1.FparamList;
            var _loc_4:* = param1.VtHasUseNum;
            var _loc_5:* = param1.FtHasUseNum;
            this._program3dBuilder.callBackFun = this.buildComplete;
            this._program3dBuilder.buildByNormal(param1.vertexCode, param1.fragmentCode, _loc_2, _loc_3, _loc_4, _loc_5);
            this._program3dBuilder.assemblerGoOn(false, 0);
            return;
        }// end function

        private function buildComplete(param1:ByteArray, param2:ByteArray, param3:String = null) : void
        {
            var _loc_4:* = new AgalVo();
            var _loc_7:* = param1;
            _loc_4.vertexBytes = param1;
            var _loc_5:* = _loc_7;
            var _loc_7:* = param2;
            _loc_4.fragBytes = param2;
            var _loc_6:* = _loc_7;
            _loc_4.callBackId = this._voObj.callBackId;
            ThreadManager.instance.sendMessageToMain(_loc_4, null, false);
            return;
        }// end function

    }
}
